package com.cskaoyan.mapper;

import com.cskaoyan.model.Address;
import com.cskaoyan.model.AddressExample;
import com.cskaoyan.model.bo.BaseParamBO;
import com.cskaoyan.model.bo.SaveAddressDetailBO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AddressMapper {
    long countByExample(AddressExample example);

    int deleteByExample(AddressExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Address record);

    int insertSelective(Address record);

    List<Address> selectByExample(AddressExample example);

    Address selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Address record, @Param("example") AddressExample example);

    int updateByExample(@Param("record") Address record, @Param("example") AddressExample example);

    int updateByPrimaryKeySelective(Address record);

    int updateByPrimaryKey(Address record);

    List<Address> queryWxAddressList(BaseParamBO param, Integer userIds);

    Address getAddressDetail(Integer id);

    void saveAddressDetail(@Param("city1") String city1, @Param("county1") String county1, @Param("province1") String province1, @Param("addressDetail1") String addressDetail1, @Param("saveAddressDetailBO") SaveAddressDetailBO saveAddressDetailBO);

    void deleteAddressDetail(Integer id);

/*
    void saveNewAddressDetail(@Param("userIds") Integer userIds, @Param("city1") String city1, @Param("county1") String county1, @Param("province1") String province1, @Param("addressDetail1") String addressDetail1, @Param("saveAddressDetailBO") SaveAddressDetailBO saveAddressDetailBO);
*/

    void saveNewAddressDetail(@Param("userIds") Integer userIds, @Param("city1") String city1, @Param("county1") String county1, @Param("province1") String province1, @Param("addressDetail1") String addressDetail1, @Param("saveAddressDetailBO") SaveAddressDetailBO saveAddressDetailBO);

    Integer getReignId(String province);

    String getReignName(Integer reignId);

    void setIsDefault(int userID);

    int getReignCityId(Integer province,String city);

    int getReignCountyId(int reignCityId, String county);
}
